public class CalcDemo01 {
    public static void main(String[] args) {
        int i = 1;
        int i1 = 2;
        System.out.println(i + i1);//3
        System.out.println(i - i1);//-1
        System.out.println(i * i1);//2
        // java中整数做运算，最终的结果一定整数
        System.out.println(i / i1);//0
        System.out.println(i % i1);//1 取余数

        int i2 = 1;
        i2++;// 再原来的值上加1
        System.out.println(i2);//2

        i2--;// 再原来的值上减1
        System.out.println(i2);//1


        int i3 = 1;
        ++i3;
        System.out.println(i3);//2
        --i3;
        System.out.println(i3);//1


        int i4 = 1;
//        System.out.println(i4++);// 先打印后加1
//        System.out.println(i4);//2
        System.out.println(++i4);// 先加后打印 2

    }
}
